package com.erp.app.admin.companyMenu.ejb;

import java.io.Serializable;

import com.erp.framework.model.pk.SimpleBasePk;

public class CompanyMenuGroupPK implements SimpleBasePk, Serializable {
    public String companyCode;
    public String groupId;
    public String menuId;
    public String roleGroupId;

    public CompanyMenuGroupPK() {
    }

    public CompanyMenuGroupPK(String companyCode, String groupId, String menuId, String roleGroupId) {
        this.companyCode = companyCode;
        this.groupId = groupId;
        this.menuId = menuId;
        this.roleGroupId = roleGroupId;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public String getGroupId() {
        return groupId;
    }

    public String getMenuId() {
        return menuId;
    }

    public int hashCode() {
        return (companyCode + groupId + menuId + roleGroupId).hashCode();
    }

    public boolean equals(Object obj) {
        if (obj instanceof CompanyMenuGroupPK) {
            CompanyMenuGroupPK pk2 = (CompanyMenuGroupPK) obj;
            return (companyCode.equals(pk2.companyCode) && groupId.equals(pk2.groupId) && menuId.equals(pk2.menuId) && roleGroupId
                    .equals(pk2.roleGroupId));
        }
        return false;
    }

    public String toString() {
        return "{companyCode = " + this.companyCode + ", groupId = " + this.groupId + ", menuId = " + this.menuId
                + ", roleGroupId = " + this.roleGroupId + "}";
    }

    public String getRoleGroupId() {

        return roleGroupId;
    }

    public void setRoleGroupId(String roleGroupId) {

        this.roleGroupId = roleGroupId;
    }

    public void setCompanyCode(String companyCode) {

        this.companyCode = companyCode;
    }

    public void setGroupId(String groupId) {

        this.groupId = groupId;
    }

    public void setMenuId(String menuId) {

        this.menuId = menuId;
    }
}
